package jtk.project4.fleet.ibatis.dao;

import java.sql.SQLException;
import java.util.List;

import nl.coderight.jazz.dialog.MessageDialog;
import nl.coderight.jazz.dialog.MessageType;
import jtk.project4.fleet.domain.EmployeeC;




public class EmployeecsDao extends IbatisDao{
	
	public List selectEmployeecs() throws SQLException {
		List selectEmployeecs = null;
			selectEmployeecs =getSqlMap().queryForList("SELECT_ALL_EMPLOYEEC", null);
		return selectEmployeecs;
	}

	public int deleteEmployeecs(Integer id) throws SQLException{
		return (int) getSqlMap().delete("DELETE_EMPLOYEEC", id);
	}
	
	public int updateEmployeecs(EmployeeC employeec) throws SQLException{
		return (int) getSqlMap().update("UPDATE_EMPLOYEEC", employeec);
	}
	
	public EmployeeC insertEmployeecs(EmployeeC employeec) throws SQLException{
		return (EmployeeC)getSqlMap().insert("INSERT_EMPLOYEEC", employeec);
	}

	/*public Vendor insertVendorType(Vendor vendor) throws SQLException {
		return (Vendor) getSqlMap().insert("INSERT_VENDOR_TYPE",vendor);
	}
	
		public List selectVendorType() throws SQLException {
		return getSqlMap().queryForList("SELECT_ALL_VENDOR_TYPE", null);
	}*/
	
		
	public static void main (String args[]) throws SQLException{
		EmployeeC employeec;
		employeec = new EmployeeC();
		employeec.setCategory("thatha");
		//new EmployeecsDao().insertEmployeecs(employeec);
		new EmployeecsDao().selectEmployeecs();
		
		}
	
}